package com.coocaa.ops.admin.base.constant;

import org.apache.commons.lang3.StringUtils;

/**
 * @author bijiahao
 * @date : 2019/1/8.
 * @description
 */
public class FilmPrefixConstant {

    private FilmPrefixConstant() {

    }


    public static final String TENCENT = "_otx_";

    public static final String YINHE = "_oqy_";

    public static final String YOUKU = "_oyk_";

    /**
     * 搜狐
     */
    public static final String SO_HU = "_sohu_";
    /**
     * 芒果TV
     */
    public static final String MG_TV = "_mgtv_";
    /**
     * 芒果TV
     */
    public static final String MOVIE_1905 = "_movie1905_";

    /**
     * cibn
     */
    public static final String CIBN = "_cibn_";
    /**
     * 哔哩哔哩
     */
    public static final String BILI = "_bili_";
    /**
     * 哔哩哔哩PGC
     */
    public static final String BILI_PGC = "_bili_pgc_";
    /**
     * 哔哩哔哩UGC
     */
    public static final String BILI_UGC = "_bili_ugc_";

    /**
     * 是否媒资第三方影视资源-点击参数需要特殊处理的
     *
     * @param filmId
     * @return
     */
    public static boolean isMediaThirdResourceNeedSpecialHandle(String filmId) {
        return isBili(filmId)
                || isCibn(filmId)
                || isMgTv(filmId)
                || isMovie1905(filmId)
                || isSoHu(filmId)
                ;
    }

    /**
     * 是否哔哩哔哩
     *
     * @param filmId
     * @return
     */
    public static boolean isBili(String filmId) {
        return StringUtils.isNotBlank(filmId) && filmId.contains(BILI);
    }

    /**
     * 是否哔哩哔哩PGC
     * @param filmId
     * @return
     */
    public static boolean isBiliPgc(String filmId) {
        return StringUtils.isNotBlank(filmId) && filmId.contains(BILI_PGC);
    }

    /**
     * 是否哔哩哔哩UGC
     * @param filmId
     * @return
     */
    public static boolean isBiliUgc(String filmId) {
        return StringUtils.isNotBlank(filmId) && filmId.contains(BILI_UGC);
    }

    /**
     * 是否搜狐
     *
     * @param filmId
     * @return
     */
    public static boolean isSoHu(String filmId) {
        return StringUtils.isNotBlank(filmId) && filmId.contains(SO_HU);
    }

    /**
     * 是否芒果TV
     *
     * @param filmId
     * @return
     */
    public static boolean isMgTv(String filmId) {
        return StringUtils.isNotBlank(filmId) && filmId.contains(MG_TV);
    }

    /**
     * 是否
     *
     * @param filmId
     * @return
     */
    public static boolean isMovie1905(String filmId) {
        return StringUtils.isNotBlank(filmId) && filmId.contains(MOVIE_1905);
    }

    /**
     * 是否 CIBN
     *
     * @param filmId
     * @return
     */
    public static boolean isCibn(String filmId) {
        return StringUtils.isNotBlank(filmId) && filmId.contains(CIBN);
    }
}
